package com.znsd.zl.statisticshouse.service.impl;



import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.znsd.zl.statisticshouse.dao.HouseRentDao;
import com.znsd.zl.statisticshouse.entity.HouseRentEntity;
import com.znsd.zl.statisticshouse.entity.vo.RentVo;
import com.znsd.zl.statisticshouse.service.IHouseRentService;
import com.znsd.zl.utils.PageUtils;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName TRent
 * @Description 房源统计service接口实现层
 * @author xyx
 * @date 2020-08-24 10:53:55
 * @Version v1.0
 */
@Component
@Service("houseRentService")
public class HouseRentServiceImpl extends ServiceImpl<HouseRentDao, HouseRentEntity> implements IHouseRentService {

	@Override
	public List<RentVo> findAll(Integer pageNum, Integer pageSize) {
		PageUtils utils=new PageUtils();
		RentVo vo=new RentVo();
		vo.setPageNum((pageNum-1)*pageSize);
		vo.setPageSize(pageSize*pageNum);
		List<RentVo> all = baseMapper.statisticsFindAll(vo);
		return all;
	}

	@Override
	public Integer counts() {
		Integer count = baseMapper.count();
		return count;
	}
}
